All Questions
5 questions
-1votes
1answer
241views
How to avoid cyclic dependency in UI application
I'm developing an UI application where I ran into an issue with a cyclic dependency. Here is the simplified code, to explain the problem. #include <list> class UiStyle; UiStyle* CreateStyle(); ...
10votes
6answers
4kviews
Why are people coding "C-style C++"?
In discussions about whether to cast the result of malloc or not when coding C, one common argument is that if you cast the result then you can compile your C code with a C++ compiler. Why would one ...
-2votes
2answers
426views
Is it ever overkill creating classes/objects? [duplicate]
I just learned how to create a class or object in C++ and I'm practicing and learning. I'm writing a text based version of a popular board game and I was wondering if it's overkill creating a class ...
4votes
2answers
1kviews
Free Standing Functions in Global Namespace
When writing non-member, free functions, can they be placed in the global namespace so long as the signature specifies a namespace-scoped object? For example, in the code below, is "Example 2" ...
15votes
2answers
996views
Which is better: a bunch of getters or 1 method with a selection string parameter?
Our knowledge domain involves people walking over a pressure-recording plate with their bare feet. We do image recognition which results in objects of the 'Foot' class, if a human foot is recognized ...